package com.xiaotu.po;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class Image {
    private Integer error;
    private String url;//图片访问路径
    private Integer width;//图片宽度
    private Integer height;//图片高度
    //success  fail
    public static Image fail(){
        return new Image(1,null,null,null);
    }

    public static  Image success(String url,Integer width,Integer height){
        return new Image(0, url, width, height);
    }
}
